import request from '@/utils/request'

// 查询指标数据源列表
export function listWordOnlineKeyDataSource(query) {
  return request({
    url: '/word/wordOnlineKeyDataSource/list',
    method: 'get',
    params: query
  })
}

// 查询指标数据源列表
export function getAllDataSource(query) {
  return request({
    url: '/word/wordOnlineKeyDataSource/listAll',
    method: 'get',
    params: query
  })
}

// 查询指标数据源详细
export function getWordOnlineKeyDataSource(id) {
  return request({
    url: '/word/wordOnlineKeyDataSource/' + id,
    method: 'get'
  })
}

// 保存指标数据源
export function saveWordOnlineKeyDataSource(data) {
  return request({
    url: '/word/wordOnlineKeyDataSource/save',
    method: 'post',
    data: data
  })
}

// 测试数据源是否正常连接
export function testDataSource(data) {
  return request({
    url: '/word/wordOnlineKeyDataSource/test',
    method: 'post',
    data: data
  })
}

// 删除指标数据源
export function delWordOnlineKeyDataSource(id) {
  return request({
    url: '/word/wordOnlineKeyDataSource/' + id,
    method: 'delete'
  })
}

// 导出指标数据源
export function exportWordOnlineKeyDataSource(query) {
  return request({
    url: '/word/wordOnlineKeyDataSource/export',
    method: 'get',
    params: query
  })
}
